package org.itboys.mobile.dto.project;

import org.apache.commons.lang3.StringUtils;
import org.itboys.admin.dto.lasted.SundayUploadDto;
import org.itboys.commons.utils.time.TimeUtils;
import org.itboys.mobile.dto.common.MobileBaseDto;
import org.itboys.mobile.entity.ZhongBaoTag;
import org.itboys.mobile.entity.mongo.project.*;

import java.util.Date;
import java.util.List;

/**
 * 作者：jiangxiong
 * 日期：2017年5月8日
 * 描述：圣代_评论（订单，商品，人员，或动态）_dto。
 */

public class ZhongBaoProjectDto extends MobileBaseDto{

    private String name;//项目名称
   // private String trade;//行业
    private Long memberId;//发起人名称
    private String memberName;// 发起人昵称
    private String memberMobile;//发起人电话
    private Long dealerId;//成交人ID
    private String dealerName;// 发起人昵称
    private String dealerMobile;//发起人电话
    private String startDate;//开始时间
    private String  endDate;//结束时间
    private String  keyWords;//关键字。用,隔开
    private String desc;//图文详情
    /* private Long provinceId;//省ID
     private String provinceName;//省名称
     private Long cityId;//市Id
     private String cityName;//市名称
     private Long districtId;//区ID
     private String districtName;//区名称
     private String address;//项目地址*/
    private Integer status;//项目状态。1，待审核，2，已审核3，已驳回 4，已成交，5已结束
    private Integer type;//1，公共项目，2私有项目
    //2017年11月13日，动态增加
    private long chatGroupId;//聊天组ID
   //动态判断属性
     private Integer isCollection;//是否收藏
     private Integer isSign;//是否报名 ,0否，1是，2审核中
     private Integer isSpread;//是否转发
    private long handlerId;//审核人ID
    //员工列表
    private List<ZhongBaoProjectEmployee> employees;
    //员工数
    //关注列表
    private List<ZhongBaoProjectInfo> collections;
    //关注数
    //报名列表
    private List<ZhongBaoProjectSign> signs;
    //转发数
    //转发列表
    private List<ZhongBaoProjectInfo> spreads;
    //项目图片
    private List<ZhongBaoProjectImage> images;

    private ZhongBaoTag tag;

    public ZhongBaoProjectDto() {

    }

    public ZhongBaoProjectDto(long id, String createTime, String createDate,
                              String name, Long memberId, String memberName, String memberMobile,
                              Long dealerId, String dealerName, String dealerMobile, Date startDate, Date endDate,
                              String keyWords, String desc, Integer status, Integer type,long chatGroupId,long handlerId) {
        super(id, createTime, createDate);
        this.name = name;
        this.memberId = memberId;
        this.memberName = memberName;
        this.memberMobile = memberMobile;
        this.dealerId = dealerId;
        this.dealerName = dealerName;
        this.dealerMobile = dealerMobile;
        this.startDate = TimeUtils.formatToDate(startDate);
        this.endDate = TimeUtils.formatToDate(endDate);;
        this.keyWords = keyWords;
        this.desc = desc;
        this.status = status;
        this.type = type;
        this.chatGroupId=chatGroupId;
        this.handlerId=handlerId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public String getMemberMobile() {
        return memberMobile;
    }

    public void setMemberMobile(String memberMobile) {
        this.memberMobile = memberMobile;
    }

    public Long getDealerId() {
        return dealerId;
    }

    public void setDealerId(Long dealerId) {
        this.dealerId = dealerId;
    }

    public String getDealerName() {
        return dealerName;
    }

    public void setDealerName(String dealerName) {
        this.dealerName = dealerName;
    }

    public String getDealerMobile() {
        return dealerMobile;
    }

    public void setDealerMobile(String dealerMobile) {
        this.dealerMobile = dealerMobile;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getKeyWords() {
        return keyWords;
    }

    public void setKeyWords(String keyWords) {
        this.keyWords = keyWords;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public long getChatGroupId() {
        return chatGroupId;
    }

    public void setChatGroupId(long chatGroupId) {
        this.chatGroupId = chatGroupId;
    }

    public Integer getIsCollection() {
        return isCollection;
    }

    public void setIsCollection(Integer isCollection) {
        this.isCollection = isCollection;
    }

    public Integer getIsSign() {
        return isSign;
    }

    public void setIsSign(Integer isSign) {
        this.isSign = isSign;
    }

    public Integer getIsSpread() {
        return isSpread;
    }

    public void setIsSpread(Integer isSpread) {
        this.isSpread = isSpread;
    }

    public List<ZhongBaoProjectEmployee> getEmployees() {
        return employees;
    }

    public void setEmployees(List<ZhongBaoProjectEmployee> employees) {
        this.employees = employees;
    }

    public List<ZhongBaoProjectInfo> getCollections() {
        return collections;
    }

    public void setCollections(List<ZhongBaoProjectInfo> collections) {
        this.collections = collections;
    }

    public List<ZhongBaoProjectSign> getSigns() {
        return signs;
    }

    public void setSigns(List<ZhongBaoProjectSign> signs) {
        this.signs = signs;
    }

    public List<ZhongBaoProjectInfo> getSpreads() {
        return spreads;
    }

    public void setSpreads(List<ZhongBaoProjectInfo> spreads) {
        this.spreads = spreads;
    }

    public List<ZhongBaoProjectImage> getImages() {
        return images;
    }

    public void setImages(List<ZhongBaoProjectImage> images) {
        this.images = images;
    }

    public ZhongBaoTag getTag() {
        return tag;
    }

    public void setTag(ZhongBaoTag tag) {
        this.tag = tag;
    }

    public long getHandlerId() {
        return handlerId;
    }

    public void setHandlerId(long handlerId) {
        this.handlerId = handlerId;
    }

    /**
     * 状态的中文信息
     */
    public String  getTypeStr(){
        String typeStr= "";
        if(type==null)return typeStr;

        switch (type) {
            case 1:
                typeStr="对外项目";
                break;
            case 2:
                typeStr="对内项目";
                break;
            default:
                break;
        }
        return typeStr;
    }
    public String  getStatusStr(){
        String statusStr= "";
        if(status==null)return statusStr;

        switch (status) {
            case 1:
                statusStr="待审核";
                break;
            case 2:
                statusStr="已审核";
                break;
            case 3:
                statusStr="已驳回";
                break;
            case 4:
                statusStr="已成交";
                break;
            default:
                break;
        }
        return statusStr;
    }
}
